< previous page page_145 next page >

Page 145
To round out your testing project, incorporate the logic from your test/scenario scripts into your form. Based on an examination of Test Scripts #1 and #2, you know you need the members listed in Table 6.1 for your form.
TABLE 6.1. SETTING UP THE FORMfrmAccountMainForm.
MemberName
Form CaptionBasic Personal Checking
Label (Account Number)lblAccountMaintForm(0)
Label (Deposit Amount)lblAccountMainForm(1)
Label (Error Message)lblAcccountMainForm(2)
TextBoxtxtAccountNumber
TextBoxtxtDepositAmount
CommandButtoncmdStore
CommandButtoncmdDone

For the Error Message label (lblAccountMaintForm(2)), set its BorderStyle to 1  Fixed Single. Your form will now look like Figure 6.13.
12180-0145a.gif
Figure 6.13.
The
frmAccountMaintForm form.
You don't want the BasicPersonalChecking class communicating directly with the frmAccountMaintForm form. Therefore, add a class named FormController to control the flow of events from the form to the component. Add methods to the class that resembles Listing 6.2. In the form, enter the following declaration in General Declarations:
Private theFormController As New FormController
LISTING 6.2. THEFormControllerCLASS METHODS AND DECLARATIONS.

9f8044bafea36a1f728739c0bb58ef4c.gif
 1: Private theForm As Form
 2:
 3: Public Sub setForm(argForm As Form)
continues

 
< previous page page_145 next page >

If you like this book, buy it!